import axios from 'axios'
export function getWeathData (cityName, cityCode) {
  this.cityName = cityName
  const that = this
  axios({
    url: 'https://restapi.amap.com/v3/weather/weatherInfo?parameters',
    method: 'GET',
    params: {
      key: 'a8eabf2acfd930aadf93de2286159169',
      city: cityCode,
      extensions: 'all',
      output: 'JSON'
    }
  }).then(function (resp) {
    that.renderWeathDom(resp.data)
  })
    .catch()
}
